<?php
/**
 * Field handler to provide race icons
 */
class mewdkp_handler_field_content_dkp extends views_handler_field_numeric {
	function render($values) {		
		$value = $values->{$this->field_alias};
		
		if ($value > 0) {
			$dkpclass = "mewdkp-dkp-positive";
		} 
		elseif ($value == 0) {
			$dkpclass = "mewdkp-dkp-neutral";
		} 
		elseif ($value < 0) {
			$dkpclass = "mewdkp-dkp-negative";
		}
		
		return '<span class="'. $dkpclass .'">'. $value .'</span>';
	}
}